<!DOCTYPE HTML>
<html style="min-width:inherit;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script>
window.onload= function(){
	var linkList=window.parent.document.getElementsByTagName("link");//获取父窗口link标签对象列表
	var head=document.getElementsByTagName("head").item(0);
	//外联样式
	for(var i=0;i<linkList.length;i++){
	var l=document.createElement("link");
		l.rel = 'stylesheet'
		l.type = 'text/css'; 
		l.href=linkList[i].href;
		head.appendChild(l);
	}
}
</script>
</head>

<body>

<style>
html,body{ min-width:800px; overflow:visible; background:#FFF;}
.tiwen_box{ width:700px; padding:0 50px;}
.wtwolist ul{ margin-right:-24px;}
.wtwolist li .wtwls{ padding:30px 24px 0 0; width:120px;}
.it_wire_wt{ clear:both; overflow:hidden; padding:0 25px; border:1px solid #e4e4e4; height:50px; line-height:50px;}
.it_wire_wt input{ border:none; background:none; height:100%; width:100%;}

.xl-editor{ border:1px solid #e4e4e4; background:#fff;}
.xl-editor-tool{ height:36px; padding-top:4px; padding-left:10px; background:#f4f4f4; border-bottom:1px solid #e4e4e4; text-align:center;}
.xl-editor-tool span{ background-image:url(../skin/img/editor-icons.png); background-repeat:no-repeat; width:31px; height:30px; line-height:30px; border:1px solid #f4f4f4; overflow:hidden; float:left; margin-right:12px; font-weight:bold; color:#666; font-size:18px; font-family:'宋体'; cursor:pointer; }
.xl-editor-tool span.curr{ color:#000000; border:1px solid #1aa3fa; background-color:#bff1fc; border-radius:2px;}
.xl-editor-tool span.ed-bold{ background-position:-0px -2px;}
.xl-editor-tool span.ed-italic{ background-position:-31px -2px;}
.xl-editor-tool span.ed-underline{ background-position:-64px -2px;}
.xl-editor-tool span.ed-separate{ background-position:-620px -33px; margin:0;}
.xl-editor-tool span.ed-sequence1{ background-position:-93px -2px;}
.xl-editor-tool span.ed-sequence2{ background-position:-124px -2px;}
.xl-editor-tool span.ed-simpleupload{ background-position:-0px -32px;}
.xl-editor-tool span.ed-blockquote{ background-position:-528px -2px;}
.xl-editor-content{ clear:both; overflow:hidden; height:150px; line-height:25px; overflow:hidden; padding:5px 5px;}
.xl-editor-content .textarea{ height:100%; width:100%; font-size:12px;}
.xl-editor-content .textarea .neirong{height:25px; line-height:25px;}
.xl-editor-content .textarea.bold{ font-weight:bold;}
.xl-editor-content .textarea.italic{ font-style:italic;}
.xl-editor-content .textarea.underline{ text-decoration:underline;}
.xl-editor-content .textarea ol{list-style-type:disc; padding-left:30px;}
.xl-editor-content .textarea ol li{list-style-type:disc;}
</style>
<div class="tiwen_box fix fs14">
    <div class="LH30 m-t30"><span>请选择话题：</span><span class="c-999999 r">话题越精准，越容易让相关领域专业人士看到你的问题</span></div>
    <div class="wtwolist bor-1aa3fa LH35 p-b40 tac fix">
        <ul class="wList20">
            <li><span class="wtwls"><a href="javascript:;">会计基础</a></span></li>
            <li><span class="wtwls"><a href="javascript:;">会计基础</a></span></li>
            <li><span class="wtwls"><a href="javascript:;">会计基础</a></span></li>
            <li><span class="wtwls"><a href="javascript:;">会计基础</a></span></li>
            <li><span class="wtwls"><a href="javascript:;">会计基础</a></span></li>
            <li><span class="wtwls"><a href="javascript:;">会计基础</a></span></li>
            <li><span class="wtwls"><a href="javascript:;">会计基础</a></span></li>
            <li><span class="wtwls"><a href="javascript:;">会计基础</a></span></li>
        </ul>
    </div>
    <div class="it_wire_wt">
    	<input type="text" placeholder="写下你的问题">
    </div>
    <div class="LH20 m-t30 m-b10">问题说明（可选）：</div>
    <div class="xl-editor">
    	<div class="xl-editor-tool">
        	<span class="ed-bold"></span>
            <span class="ed-italic"></span>
            <span class="ed-underline"></span>
            <span class="ed-separate"></span>
            <span class="ed-blockquote"></span>
            <span class="ed-sequence1"></span>
            <span class="ed-sequence2"></span>
            <span class="ed-simpleupload"></span>
        </div>
        <div class="xl-editor-content">
        	<!--<textarea></textarea>-->
            <div class="textarea">
            	<p class="neirong" contenteditable="true"></p>
            </div>
        </div>
    </div>
</div>
<script src="../skin/js/jquery-1.11.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	$('.xl-editor-content').find('.textarea').bind('click', function(){
		$(this).children('.neirong').focus();
	});
	$('.xl-editor-tool').find('span:not(".ed-separate")').bind('click', function(e){
		var class_attr = $(this).attr('class');
		var curr = 'curr';
		var cont = $('.xl-editor-content').children();
		$(this).toggleClass(curr);
		cont.focus();
		if($(this).hasClass('ed-bold')){
			if($('.ed-bold').hasClass('curr')){
				cont.addClass('bold');
			}else{
				cont.removeClass('bold');
			}
		}else if($(this).hasClass('ed-italic')){
			if($('.ed-italic').hasClass('curr')){
				cont.addClass('italic');
			}else{
				cont.removeClass('italic');
			}
		}else if($(this).hasClass('ed-underline')){
			if($('.ed-underline').hasClass('curr')){
				cont.addClass('underline');
			}else{
				cont.removeClass('underline');
			}
		}else if($(this).hasClass('ed-sequence1')){
			if($('.ed-sequence1').hasClass('curr')){
				cont.addClass('sequence1');
				cont.children('.neirong').wrap("<ol><li></li></ol>");
			}else{
				cont.removeClass('sequence1');
				cont.children('ol li').unwrap();
			}
		}else if($(this).hasClass('ed-sequence2')){
			if($('.ed-sequence2').hasClass('curr')){
				cont.addClass('sequence2');
			}else{
				cont.removeClass('sequence2');
			}
		}else if($(this).hasClass('ed-blockquote')){
			if($('.ed-blockquote').hasClass('curr')){
				cont.addClass('blockquote');
			}else{
				cont.removeClass('blockquote');
			}
		}else if($(this).hasClass('ed-simpleupload')){
			if($('.ed-simpleupload').hasClass('curr')){
				cont.addClass('simpleupload');
			}else{
				cont.removeClass('simpleupload');
			}
		}
		e.stopPropagation();
	});
});
</script>
</body>
</html>
